@bg: #5093f9;

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font: bold 24px "Courier";
}


#main {
    width: 360px;
    height: 420px;
    background-color: @bg;
    // 样式
    margin: 100px auto;
    border: 10px solid #000;
    border-radius: 10px;
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-content: space-around;

    // 游戏舞台
    #stage {
        width: 304px;
        height: 304px;
        border: 2px solid #000;
        position: relative;

        #snake {
            &>div {
                width: 10px;
                height: 10px;
                background-color: #000;
                border: 1px solid @bg;
                // 绝对定位
                position: absolute;
            }
        }

        #food {
            width: 10px;
            height: 10px;
            position: absolute;
            left: 40px;
            top: 100px;
            display: flex;
            flex-flow: wrap;
            // background-color: red;
            justify-content: space-between;
            align-content: space-between;

            &>div {
                width: 5px;
                height: 5px;
                background-color: #000;
                border: .5px solid @bg;
                transform: rotate(45deg);
            }
        }
    }

    // 计分栏
    #score-panle {
        width: 300px;
        display: flex;
        justify-content: space-between;
    }
}